<!DOCTYPE html>

<html xmlns:th="http://www.thymeleaf.org">
<head>
<meta charset="utf-8" />
<title th:utext="#{title.newapplication}"></title>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="description" content="" />
<meta name="author" content="Dhrubo" />

<!-- Le styles -->
<link rel="stylesheet" type="text/css" media="all" th:href="@{/resources/css/bootstrap.css}" />

<link rel="stylesheet" type="text/css" media="all" th:href="@{/resources/css/bootstrap-responsive.css}" />

<link rel="stylesheet" type="text/css" media="all" th:href="@{/resources/css/DT_bootstrap.css}" />
	
<link rel="stylesheet" type="text/css" media="all" th:href="@{/resources/css/common.css}" />

</head>

<body>

	<div th:substituteby="fragments/userheader :: navbar"> </div>

	<div class="container-fluid">
	
		
		<div class="row-fluid">

			<div class="span12">

				<form th:action="@{/saveapp}" th:object="${app}" 
					class="form-horizontal" id="newappform" method="post">


					<fieldset>

						<legend >
							<span th:utext="#{newapplication}"></span>
						<a class="btn btn-primary pull-right" href="listapplications" th:utext="#{listapplications}"></a>
						</legend>
						
						<div id="message" ></div>
							
						<div class="control-group">
							<label class="control-label" for="name" th:utext="#{applicationname}"></label>
							<div class="controls">
								<input type="text" th:field="*{name}" class="input-xxlarge"
									th:placeholder="#{applicationname}" required="required" />
							</div>
						</div>
						
						<div class="control-group">
							<label class="control-label" for="salt"  th:utext="#{salt}"></label>
							<div class="controls">
								<input type="text" th:field="*{salt}" class="input-xxlarge" id="salt" 
									th:placeholder="#{salt}" required="required" />
							</div>
						</div>
						
						
						<div class="control-group">
							<label class="control-label" for="pubk"  th:utext="#{publickey}"></label>
							<div class="controls">
								<input type="text" th:field="*{publicKey}" class="input-xxlarge" id="pubk" 
									th:placeholder="#{systemgenerated}" readonly="readonly" />
							</div>
						</div>
						
						<div class="control-group">
							<label class="control-label" for="name"  th:utext="#{privatekey}"></label>
							<div class="controls">
								
								<input type="text" th:field="*{privateKey}" class="input-xxlarge" id="pvtk" 
									th:placeholder="#{systemgenerated}" readonly="readonly" />
							</div>
						</div>
						
						<div class="control-group">
							<label class="control-label" for="name"  th:utext="#{description}"></label>
							<div class="controls">

								<textarea rows="3" cols="40" th:field="*{description}"
									class="input-xxlarge" th:placeholder="#{description}"></textarea>
							</div>
						</div>

						<div class="form-actions">
							<button type="submit" class="btn btn-success" th:utext="#{save}"></button>
							<button type="reset" class="btn btn-info" th:utext="#{cancel}"></button>
							
							
						</div>

					</fieldset>
				</form>


			</div>
			<!--/span-->
		</div>
		<!--/row-->

		<hr />



	</div>
	<!--/.fluid-container-->

	<div th:substituteby="fragments/userheader :: footer"> </div>

	<!-- Le javascript
    ================================================== -->
	<!-- Placed at the end of the document so the pages load faster -->
	
	<script src="js/jquery.js" th:src="@{/resources/js/jquery.js}"></script>
	
	<script src="js/bootstrap-dropdown.js"
		th:src="@{/resources/js/bootstrap-dropdown.js}"></script>
		
	<script src="js/bootstrap-alert.js"
		th:src="@{/resources/js/bootstrap-alert.js}"></script>	

	<script src="js/newproject.js" th:src="@{/resources/js/newapplication.js}"></script>


</body>
</html>
